<template>
  <el-input
    v-model="modelValue"
    type="textarea"
    :rows="props.rows"
    @input="handleInput"
    @blur="handleBlur"
  ></el-input>
</template>

<script setup>
const modelValue = defineModel();
const emit = defineEmits(['change', 'blur']);
const props = defineProps({
  rows: {
    type: Number,
    default: 5
  },
});

const handleInput = (val) => {
  emit('change', val);
};

const handleBlur = (event) => {
  emit('blur', event);
};
</script>